<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>My JSP 'register_msg.jsp' starting page</title>
		<script type="text/javascript">
			function toOtherPage() {
				var total = 3; // 倒计时
				var span_timer = document.getElementById("span_timer");
				span_timer.innerHTML = total;
				var timer = setInterval(function() {
					if (total <= 0) {
						window.close();
						//location.href = document.getElementById("a_url").href; // 跳转
						//window.opener.location.href = document.getElementById("a_url").href; // 跳转
						window.opener.location.href = window.opener.location.href; // 跳转
						clearInterval(timer);
						timer = 0;
					} else
						span_timer.innerHTML = --total;
		
		    	}, 1000);
			}
		</script>
	</head>

	<body onload="toOtherPage()">


		<%=request.getAttribute("msg")%>

		页面在
		<font color="red"><span id="span_timer"></span></font>后自动跳转，或者点击
		<a id="a_url" href="${url }">此处</a>
		手动跳转
	</body>
</html>
